<template>
  <section>
    <h3>{{title}}</h3>
    <mavon-editor v-model="value" style="margin-top: 24px;z-index: 1" :ishljs="true" :editable="false"
                  :toolbarsFlag="false" :subfield="false"
                  :default_open="'preview'"/>
  </section>
</template>
<script>
  import { getArticleList } from '../../public/api'

  export default {
    data () {
      return {
        value: '',
        title: ''
      }
    },
    mounted () {
      getArticleList({
        id: this.$route.params.id
      }).then(
        data => {
          this.value = data.data.article
          this.title = data.data.title
        }
      ).catch(data => {})
    }

  }
</script>
<style>

</style>
